package com.lyz.dataStructure.考研上机编程题;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/9/17 20:13
 *@Description:
 **/
public class 反向输出 {
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        while (s.hasNext()){
            String str =  s.nextLine();
            System.out.println( reverseStr(str));
        }
    }

    public static String reverseStr(String s){
        if(s.length()==0||s==null) return null;
        StringBuffer sb = new StringBuffer();
        for(int i =s.length()-1;i>=0;i--){
            sb.append(s.charAt(i));
        }
        return sb.toString();
    }
}
